<!DOCTYPE html> 
<html>
<head>  
	<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"> 
	<title>Oauth 授权</title> 
	<meta charset="utf-8" />
</head>
<body>
<?php
if(empty($_GET['url'])){
	exit('参数不完整');
}

$APPID = 'wx7197628dc9966e3d';
$SECRET = '2df3acd8ec9b083b374fedf18fa723e5';

$url = $_GET['url'];
$data = empty($_GET['data'])?'id':$_GET['data'];
$call = urlencode('http://api.weixinzjit.com/auth/back.php?url='.$url.'&data='.$data);

$UaothUrl = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid='.$APPID.'&redirect_uri='.$call.'&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect';
?> 
<script language="javascript">
location.href='<?php echo $UaothUrl; ?>';
</script>
</body>
</html>